package chap3_11;

import java.util.Scanner;

public class Exer3_11_10 {
    public static void main(String[] args) {
        int[] num1 = {2, 3, 4, 5, 6, 7, 8, 9};
        int[] num2 = {2, 3, 4, 5, 6, 7, 8, 7};
        if (num1.length != num2.length) {
            System.out.println("两个数组不相同");
        } else {
            for (int i = 0; i < num1.length; i++) {
                for (int j = i; j < num2.length; j++) {
                    if (num1[i] == num2[j]) {
                        break;
                    } else {
                        System.out.println("两个数组不相同");
                        return;
                    }
                }
                if (i == num1.length - 1) {
                    System.out.println("两个数组相同");
                }
            }
        }
    }
}
